package com.hehui.module.customer.dao;


import com.hehui.module.customer.entity.BaseCustomer;
import org.apache.ibatis.annotations.Param;

import java.util.List;
/**客户接口
 * @return: null
 * @param null:
 * @author: why
 * @date: 2021/1/7 18:19
 * @description:
 */
public interface BaseCustomerMapper {

    public List<BaseCustomer> selectAllList(BaseCustomer customer);

    public int insertSelective(BaseCustomer record);

    public BaseCustomer selectByPrimaryKey(Long customerId);

    public int updateByPrimaryKeySelective(BaseCustomer record);

    public List<BaseCustomer> checkUserNameUnique(@Param("username") String username,@Param("merchantId")Long merchantId);

    public List<BaseCustomer> checkMobileUnique(@Param("mobile") String mobile,@Param("merchantId")Long merchantId);

    public List<BaseCustomer> checkMailUnique(@Param("mail") String mail,@Param("merchantId")Long merchantId);

    public int updateCustomerStateByIds(@Param("customerIds") Long[] customerIds, @Param("state") String state);

    public int deleteCustomerByIds(@Param("customerIds") Long[] customerIds);

    public String getMaxNum(Long merchantId);

    public List<BaseCustomer> checkNumUnique(@Param("num") String num,@Param("merchantId")Long merchantId);

}